<template>
    <h2>用户列表显示</h2>
    <table class="table table-border" border="1" cellpadding="0" cellspacing="0">
        <thead>
            <tr>
                <td>用户编号</td>
                <td>用户名称</td>
                <td>用户密码</td>
                <td>用户注册时间</td>
            </tr>
        </thead>
        <tbody>
            <tr v-for="item in info">
                <td>{{ item.Uid }}</td>
                <td>{{ item.UName }}</td>
                <td>******</td>
                <td>{{ item.UDate.replace("T","   ").substring(0,21) }}</td>
            </tr>
        </tbody>
    </table>
</template>
<script setup lang="ts">
import {ref,onMounted} from 'vue'
import axios from 'axios'

const info=ref([{
    Uid:"",
    UName:"",
    UPwd:"",
    UDate:""
}])
onMounted(()=>{
    shpw()
})
const shpw=()=>{
    axios({
        url:"https://localhost:44394/api/UserLoginController/UsersLoginShow",
        method:"get"
    })
    .then(res=>{
        info.value=res.data
    })
}
</script>